<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.Date"%>
<%@page import="com.ereport.entity.Executives"%>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>KK Circuits &amp; Equipments E-Reporting</title>

<link href="<%=application.getContextPath() %>/css/css.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=application.getContextPath() %>/js/jquery-1.6.min.js"></script>	
<script language="javascript" src="<%=application.getContextPath() %>/js/calendar_eu.js"></script>
<script type="text/javascript" src="<%=application.getContextPath() %>/js/jquery-ui-1.8.17.custom.min.js"></script>	
<link rel="stylesheet" href="<%=application.getContextPath() %>/css/jquery-ui-1.8.17.custom.css"/>

<style>
	#editor{
	width:95%;
	}
	#contactDet{
	width:95%;
	}
	#nextsteppopup {
	position:absolute;
  z-index:200; /* aaaalways on top*/
  padding: 3px;
 
  width: 250px;
  color: white;
	}
	.ui-dialog .ui-state-error { padding: .3em; }
	.ui-corner-all{
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	font-weight: normal;
	color: #666666;
	text-decoration: none;
	}
	.ui-corner-all:hover{
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	font-weight: normal;
	color: #666666;
	text-decoration: none;
	}
	.logout{
	font-family: Arial, Helvetica, sans-serif;
	font-size: 13px;
	height: 15px;
	width: 50px;
	font-weight: normal;
	color: red;
	text-decoration: none;
	}
	#bulletinDialog title{
	font-family:Arial, Helvetica, sans-serif;
	font-size:14px;
	font-weight:bold;
	}
	</style>
<%-- <script type="text/javascript">
function valdate(){
	var c=0;
	var dt=$("#dateHeader").val();
	var i=1;
	$("#infoTable tr").each(function(j){
		//alert(j);
		
	var org=$("#org"+i).val();
		//alert(org);
		var data="org="+org+"&dt="+dt;
		
		$.ajax({
			url:"<%=application.getContextPath() %>/dailyCallReport/validate.do",
			mimetype: "text/plain",
			method: "post",
			cache: false,
			async:false,
			data: data,
			success: function(res){
				if(res=="false"){
				c=c+1;
				alert("Enquiry of  '"+org+"'  not Generated");
				//alert(c);
			}
			}
		});
		i++;
	});
	
}

</script> --%>
	<script type="text/javascript">
	
	$(document).ready(function(){
		$('.popup4').live('click',function(){
			var id=this.id;
			//alert(id);
			var $dialog = $('#visitobjDialog').dialog({
               				 autoOpen: false,
                			 modal: true,
                			 width: 280,
                			 height: 380,
					      });
			$("#vistObj").val([]);
			$("#vistObj").attr("class", id);
			var text=$("#visit"+id).val();
			//alert(text);
			if(text!=""){
			var items=text.split(",");
			//$('.'+id+' option').attr('selectedIndex', '-1');
			//var sel=$("."+id+" option");
			//alert(sel);
			//alert(sel.length);
			
			for(var i=0;i<items.length;i++){
			
			$("."+id+" option[value='"+items[i]+"']").attr("selected", true);
			}
			
			
			}
			 $dialog.dialog('open');
		});
	});
		
	</script>
	<script type="text/javascript">
	$(document).ready(function(){
		$('.popup5').live('click',function(){
			var id=this.id;
			//alert(id);
			
			var $dialog = $('#visitOcDialog').dialog({
               				 autoOpen: false,
                			 modal: true,
                			 width: 420,
                			 height: 250,
					      });
			$("#vistoutcome").attr("class", id);
			var text=$("#visit"+id).val();
			$("."+id).val(text);
			 $dialog.dialog('open');
		});
	});
		
	</script>
	

<script  type="text/javascript">
$(document).ready(function(){
$('.popup').live('click',function(){
var id=this.id;
//alert(id);
var $dialog = $('#bulletinDialog').dialog({
                autoOpen: false,
                modal: true,
                width: 285,
                height: 230,
			 });
 			$("#editor").attr("class", id);
			var text=$("#nst"+id).val();
			$("."+id).val(text);
           // $("#bulletinDialog").parent().appendTo($("form:first"));
 
            $dialog.dialog('open');
});
});

		
    </script>
<script  type="text/javascript">
$(document).ready(function(){
$('.popup3').live('click',function(){
var id=this.id;
//alert(id);
var $dialog = $('#contdetDailog').dialog({
                autoOpen: false,
                modal: true,
                width: 250,
                height: 250,
				
				
            });
 			
			
 			$("#email").attr("class", "email"+id);
			var text=$("#email"+id).val();
			$(".email"+id).val(text);
 			
			$("#fax").attr("class", "fax"+id);
			var text=$("#fax"+id).val();
			$(".fax"+id).val(text);
 			
			$("#landph").attr("class", "landph"+id);
			var text=$("#landph"+id).val();
			$(".landph"+id).val(text);
 			
			
			
			
           // $("#bulletinDialog").parent().appendTo($("form:first"));
 
            $dialog.dialog('open');
});
});

		
    </script>
	<script>
	$(document).ready(function(){
$('.comp').live('focusin',function(){
	
	
	var id=this.id;
	//var orlist=$("#orglist").val();
	$("#ajaxLoader").show();
	$.ajax({
		url:"<%=application.getContextPath()%>/dailyCallReport/getCompany.do",
		mimetype:"text/plain",
		cache:false,
		success: function(res){
				var t=res.split("/");
				$('#'+id).autocomplete({
					source: t
				});
				jQuery('.ui-autocomplete').css({'font-size':'10px','font-family':'Arial','max-height': '100px',
			'overflow-y': 'auto', 'padding-right': '20px', 'overflow-x': 'hidden'});
			}

		}).done(function(html){
			$("#ajaxLoader").hide();
		}).fail(function(html){
			$("#ajaxLoader").hide();
			alert("Failed To Load the Data");
		});
	
	
	});
	});
	
	</script>
<script>
$(document).ready(function(){
$('.division').live('focusin',function(){
	
	var id=this.id;
	var temp=id.split("-");
	//alert(temp[1]);
	 var org=$("#org-"+temp[1]).val();
	 $("#ajaxLoader").show();
	 var data="org="+org;
	 $.ajax({
		 url:"<%=application.getContextPath() %>/dailyCallReport/getDivision.do",
		 mimetype: "text/plain",
		 method: "post",
		 data: data,
		 success: function(res){
			 
			 var t=res.split("/");
			 $('#'+id).autocomplete({
					source: t
				});
				jQuery('.ui-autocomplete').css({'font-size':'10px','font-family':'Arial','max-height': '100px',
			'overflow-y': 'auto', 'padding-right': '20px', 'overflow-x': 'hidden'});
		 }
		 
	 }).done(function(html){
			$("#ajaxLoader").hide();
		}).fail(function(html){
			$("#ajaxLoader").hide();
			alert("Failed To Load the Data");
		});
	});
	});
	
</script>
<script>
$(document).ready(function(){
$('.contPerson').live('focusin',function(){
	
	var id=this.id;
	var temp=id.split("-");
	var org=$("#org-"+temp[1]).val();
	var div=$("#disig-"+temp[1]).val();
	$("#ajaxLoader").show();
	 var data="org="+org+"&div="+div;
	 $.ajax({
		 url:"<%=application.getContextPath() %>/dailyCallReport/getContPerson.do",
		 mimetype: "text/plain",
		 method: "post",
		 data: data,
		 success: function(res){
			 
			 var t=res.split("/");
			 $('#'+id).autocomplete({
					source: t
				});
				jQuery('.ui-autocomplete').css({'font-size':'10px','font-family':'Arial','max-height': '100px',
			'overflow-y': 'auto', 'padding-right': '20px', 'overflow-x': 'hidden'});
		 }
		 
	 }).done(function(html){
			$("#ajaxLoader").hide();
		}).fail(function(html){
			$("#ajaxLoader").hide();
			alert("Failed To Load the Data");
		});
	});
	});
	
</script>
<script>
$(document).ready(function(){
$('.contPerson').live('focusout',function(){
	
	var id=this.id;
	var temp=id.split("-");
	var org=$("#org-"+temp[1]).val();
	var div=$("#disig-"+temp[1]).val();
	var contpr=$("#contper-"+temp[1]).val();
	$("#ajaxLoader").show();
	 var data="org="+org+"&div="+div+"&contper="+contpr;
	 $.ajax({
		 url:"<%=application.getContextPath() %>/dailyCallReport/getContPersonDet.do",
		 mimetype: "text/plain",
		 method: "post",
		 data: data,
		 success: function(res){
			 
			 var t=res.split("/");
			 $("#emailcontpop-"+temp[1]).val(t[1]);
			 $("#faxcontpop-"+temp[1]).val(t[0]);
			 $("#landphcontpop-"+temp[1]).val(t[2]);
			 
		 }
		 
	 }).done(function(html){
			$("#ajaxLoader").hide();
		}).fail(function(html){
			$("#ajaxLoader").hide();
			alert("Failed To Load the Data");
		});
	});
	});
	
</script>

<script language="javascript">
	var newRowCount=1;
        function addRow(infotable) {
 
            var table = document.getElementById(infotable);
 			var rowCount = table.rows.length;
			var row = table.insertRow(rowCount);
			row.className="tdinput";
			
		    var cell1 = row.insertCell(0);
		    cell1.setAttribute("bgcolor","#cccccc");
            var element1 = document.createElement("input");
            element1.type = "checkbox";
            cell1.appendChild(element1);
 			
			
            var cell2 = row.insertCell(1);
            cell2.setAttribute("bgcolor","#cccccc");
            cell2.setAttribute("align","center");
            cell2.innerHTML = "<input name='sno' class='tdinput' id='sno' type='text' value='"+rowCount+"' readonly='readonly'/>";
 
          			
			 var cell3 = row.insertCell(2);
            cell3.setAttribute("bgcolor","#cccccc");
            cell3.innerHTML='<input name="org'+(newRowCount+1)+'" class="tdinput comp" id="org-'+(newRowCount+1)+'" type="text" size="8"   />';
			
			
			var cell4 = row.insertCell(3);
			cell4.setAttribute("bgcolor","#cccccc");
			cell4.innerHTML='<input name="disig'+(newRowCount+1)+'" id="disig-'+(newRowCount+1)+'" type="text" size="8" class="tdinput division"/>';
			
			var cell5 = row.insertCell(4);
			cell5.setAttribute("bgcolor","#cccccc");
			cell5.innerHTML='<input name="contper'+(newRowCount+1)+'" id="contper-'+(newRowCount+1)+'" type="text" size="8" class="tdinput contPerson"/>';
			
			var cell6 = row.insertCell(5);
			cell6.setAttribute("bgcolor","#cccccc");
			cell6.setAttribute("align","center");
			cell6.innerHTML='<img src="<%=application.getContextPath() %>/images/arrow-li-2.gif" width="26" height="22" border="0" align="absmiddle" id="contpop-'+(newRowCount+1)+'" class="popup3"/>'
			
            +'<input type="hidden" name="email'+(newRowCount+1)+'" id="emailcontpop-'+(newRowCount+1)+'" value=""/>'
            +'<input type="hidden" name="fax'+(newRowCount+1)+'" id="faxcontpop-'+(newRowCount+1)+'" value=""/>'
            +'<input type="hidden" name="lndPhn'+(newRowCount+1)+'" id="landphcontpop-'+(newRowCount+1)+'" value=""/>';
            
		    var cell8 = row.insertCell(6);
		    cell8.setAttribute("bgcolor","#cccccc");
		    cell8.innerHTML='<table width="100%" border="0" cellspacing="0" cellpadding="0">'
               +' <tr><td width="98%" align="center" valign="top"><input type="text" size="8" name="vistObj'+(newRowCount+1)+'" id="visitObjpop'+(newRowCount+1)+'" value="" readonly="readonly" class="tdinput"/></td>'
              +' <td width="2%" align="center" valign="top"><img src="<%=application.getContextPath() %>/images/list-2.jpg" width="16" height="16" border="0" align="right" id="Objpop'+(newRowCount+1)+'" class="popup4"/></td></tr>'
              +'</table>';
           			
			var cell9 = row.insertCell(7);
            cell9.setAttribute("bgcolor","#cccccc");
            cell9.innerHTML='<table width="100%" border="0" cellspacing="0" cellpadding="0">'
                +' <tr><td width="97%" align="center" valign="top"><input type="text" name="vistOC'+(newRowCount+1)+'" id="visitOCpop'+(newRowCount+1)+'" value="" class="tdinput"/></td>'
               +' </tr>'
               +'</table>';
			
			
			  var cell10 = row.insertCell(8);
			  cell10.setAttribute("bgcolor","#cccccc");
			  cell10.setAttribute("align","center");
			cell10.innerHTML='<img src="<%=application.getContextPath() %>/images/arrow-li-2.gif" width="26" height="22" border="0" align="absmiddle" id="pop'+(newRowCount+1)+'" class="popup"/>'
			+'<input type="hidden" name="nst'+(newRowCount+1)+'" id="nstpop'+(newRowCount+1)+'"/>';
			
			
			var cell11 = row.insertCell(9);
			cell11.setAttribute("bgcolor","#cccccc");
			cell11.innerHTML='<input name="kms'+(newRowCount+1)+'" id="kms'+(newRowCount+1)+'" type="text" size="3"  class="tdinput" />';
			
			 
			   
		<%--  var cell12 = row.insertCell(10);
			cell12.setAttribute("bgcolor","#cccccc");
			cell12.setAttribute("align", "center");
			var aTag = document.createElement('a');
			aTag.setAttribute('href',"javascript:void()");
			aTag.setAttribute('onclick',"javascript:window.open('<%=application.getContextPath() %>/opportunity/open.do?org='+$('#org"+(newRowCount+1)+"').val()+'&div='+$('#disig"+(newRowCount+1)+"').val()+'&contPers='+$('#contper"+(newRowCount+1)+"').val())");
			 
			var enqImg= document.createElement("img");
			enqImg.setAttribute("src", "<%=application.getContextPath() %>/images/enquiry-2.jpg");
			enqImg.setAttribute("align", "middle");
			enqImg.setAttribute("id", "enq"+(newRowCount+1));
			
			aTag.appendChild(enqImg);
			cell12.appendChild(aTag);  --%> 
			
			newRowCount++;
			        $("#rCount").val(newRowCount);
 
        }
 
        function deleteRow(infotable) {
            try {
            var table = document.getElementById(infotable);
            var rowCount = table.rows.length;
 
            for(var i=0; i<rowCount; i++) {
                var row = table.rows[i];
                var chkbox = row.cells[0].childNodes[0];
                if(null != chkbox && true == chkbox.checked) {
                    table.deleteRow(i);
                    rowCount--;
                    i--;
                }
 
            }
			for(var i=0; i<rowCount-1; i++){
				
			var r=table.rows[i+1];
           r.cells[1].innerHTML = i+1;
                   
          
			}
			 
            }catch(e) {
                alert(e);
            }
        }
 
    </script>
    <script>

	$(function() {
		$( "#datepicker" ).datepicker({ dateFormat: "dd-mm-yy" });
	});
	</script>
</head>

<body >
<form action="<%=application.getContextPath() %>/dailyCallReport/save.do" method="post" id="dailyform" name="myform"  >
<table width="927" style="height:880px" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td height="116" align="left" valign="top" background="<%=application.getContextPath() %>/images/top-bg.jpg" style="background-repeat:repeat-x; background-position:left top">
    <%@ include file="common/exe-header.jsp" %>
    </td>
  </tr>
  
  <tr>
    <td  align="left" valign="top"><table width="927" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="20">&nbsp;</td>
        <td width="643" align="right"><a href="<%=application.getContextPath() %>/logout.php">
          </a>
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td align="left" valign="top">&nbsp;<a href="<%=application.getContextPath() %>/user/open.do"><img src="<%=application.getContextPath() %>/images/home1.jpg" width="20" height="20" border="0" /></a></td>
              <td width="8%" align="center"><a href="<%=application.getContextPath() %>/user/logout.do" style="font-family: sans-serif;">&nbsp;&nbsp;Logout</a></td>
            </tr>
          </table>
         </td>
        <td width="20">&nbsp;</td>
      </tr>
      
      <tr>
        <td width="20">&nbsp;</td>
        <td align="center" valign="top" class="heading">Daily Call Report </td>
        <td width="20">&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td align="center">
        <%
        if(request.getParameter("dailycall")!=null){
        	out.println(request.getParameter("dailycall"));
        }
        %>
        </td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td align="center" valign="top"><table width="870" border="0" cellspacing="0" cellpadding="0">
       <tr>
            <td align="left" valign="top">
           <table width="895" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td>
                <table width="100%" border="0" align="center" cellpadding="3" style="border-top-left-radius: 5px ;border-top-right-radius: 5px ;" cellspacing="1" bgcolor="#787878" class="tablebox" id="infoTable">
                  <tr style="background:url('<%=application.getContextPath() %>/images/hed-bg-block-2.jpg'); background-repeat:repeat-x; background-position:left top">
                    <td width="2%" align="center" valign="middle" class="hed" style="border-top-left-radius:5px "></td>
                    <td width="2%" height="30" align="center" valign="middle" class="hed"><strong>Sr. No </strong></td>
                    <td width="18%" align="center" valign="middle" class="hed">Company</td>
                    <td width="10%" align="center" valign="middle" class="hed">Division/Group</td>
                    <td width="10%" align="center" valign="middle" class="hed"><strong>Contact Person </strong></td>
                    <td width="4%" align="center" valign="middle" class="hed">Contact Details</td>
                    <td width="20%" align="center" valign="middle" class="hed"><strong>Objective </strong></td>
                    <td width="20%" align="center" valign="middle" class="hed">Cutomer Feed Back</td>
                    <td width="9%" align="center" valign="middle" class="hed"><strong>Action To Be Taken </strong></td>
                    <td width="6%" align="center" valign="middle" class="hed" style="border-top-right-radius:5px "><strong>Kms</strong></td>
                    <!--  <td width="4%" align="center" valign="middle" class="hed">&nbsp;</td>  --> 
                  </tr>
                  <tr>
                    <td height="20" bgcolor="#cccccc" ><input type="checkbox" name="checkbox" value="checkbox" />                    </td>
                  	<td align="center" bgcolor="#cccccc"><input name="sno" class="tdinput" id="sno" type="text" value="1" readonly="readonly"/></td>
                    <td bgcolor="#cccccc"><input name="org1" class="tdinput comp" id="org-1" type="text" size="8" />
                    <!--<input type="hidden" id="orglist" value="<%=request.getAttribute("orglist")%>"/>
                    --></td>
                    <td bgcolor="#cccccc"><input name="disig1" id="disig-1" type="text" size="8" class="tdinput division"/></td>
                    <td bgcolor="#cccccc"><input name="contper1" id="contper-1" type="text" size="8" class="tdinput contPerson"/></td>
                    <td  align="center" bgcolor="#cccccc">
                    <img src="<%=application.getContextPath() %>/images/arrow-li-2.gif" width="26" height="22" border="0" align="absmiddle" id="contpop-1" class="popup3"/>
                    <!--<input type="hidden" name="mbl1" id="mblcontpop-1" value=""/> -->
                    <input type="hidden" name="email1" id="emailcontpop-1" value=""/>
                    <input type="hidden" name="fax1" id="faxcontpop-1" value=""/>
                    <input type="hidden" name="lndPhn1" id="landphcontpop-1" value=""/>
                    
                    </td>
                     <div id="contdetDailog" style="display: none;" title="Contact Details">
                  <p class="validateTips">All form fields are required.</p> 
                  <fieldset>
		<!--<label for="name">Mobile</label>
		<input type="text" name="mobile" size="35" id="mobile" value="" />
		--><label for="email">Email</label>
		<input type="text" name="email" size="35" id="email" value="" readonly="readonly"/>
		<label for="fax">Fax</label>
		<input type="text" name="fax" size="35" id="fax" value="" readonly="readonly"/>
        	<label for="Land">Land Phone</label>
		<input type="text" name="landph" size="35" id="landph" value="" readonly="readonly" />
        	
	</fieldset>
                   
                     </div>            
                    
                    <td width="75" bgcolor="#cccccc">
                    	<table width="100%" border="0" cellspacing="0" cellpadding="0">
               				 <tr>
               				 	<td width="98%" align="center" valign="top">
               				 		<input type="text" name="vistObj1" id="visitObjpop1" size="8" value="" readonly="readonly" class="tdinput"/>
               				 	</td>
              					<td width="2%" align="center" valign="top">
              						<img src="<%=application.getContextPath() %>/images/list-2.jpg" width="16" height="16" border="0" align="right" id="Objpop1" class="popup4"/>
              					</td>
              				</tr>
              			</table>
              			<div id="visitobjDialog" style="display: none;" title="Objectives">
              			<p>
               				 		<select name="visitobj"  size="10" id="vistObj" style="width: 250px; height: 280px" multiple="multiple">
                    				 <option value="Account Projects">Account Projects</option>
                    				 <option value="Account Review">Account Review</option>
                    				 <option value="Account Web Usage">Account Web Usage</option>
                    				 <option value="ADP Update">ADP Update</option>
                    				 <option value="Back Order">Back Order</option>
                    				 <option value="BOM">BOM</option>
                    				 <option value="BOM/Project/MRO list">BOM/Project/MRO list</option>
                    				 <option value="Brands">Brands</option>
                    				 <option value="Budgetory Quote Subvision">Budgetory Quote Subvision</option>
                    				 <option value="Calibration">Calibration</option>
                    				 <option value="Chasing Quote">Chasing order</option>
                    				 <option value="Check Price/Stock">Check Price/Stock</option>
                    				 <option value="Cold call">Cold call</option>
                    				 <option value="Competitor Cross Reference">Competitor Cross Reference</option>
                    				 <option value="Complaint">Complaint</option>
                    				 <option value="Consolidated Shipment">Consolidated Shipment</option>
                    				 <option value="Credit Control/Invoice Issues">Credit Control/Invoice Issues</option>
                    				 <option value="Technical Issues">Technical Issues</option>
                    				 <option value="Customer Complaint">Customer Complaint</option>
                    				 <option value="Customer Mapping">Customer Mapping</option>
                    				 <option value="Customer Presentation">Customer Presentation</option>
                    				 <option value="Delivery Standard Service">Delivery Standard Service</option>
                    				 <option value="Demonstration/Installation">Demonstration/Installation</option>
                    				 <option value="Discount">Discount</option>
                    				 <option value="Discount Profile">Discount Profile</option>
                    				 <option value="Enquiry Generation">Enquiry Generation</option>
                    				 <option value="Handle Rejaction">Handle Rejaction</option>
                    				 <option value="Introduction">Introduction</option>
                    				 <option value="Lapsed Revival">Lapsed Revival</option>
                    				 <option value="Order Finalisation">Order Finalisation</option>
                    				 <option value="Order Placed">Order Placed</option>
                    				 <option value="Partial Shipment">Partial Shipment</option>
                    				 <option value="Payment Methods">Payment Methods</option>
                    				 <option value="Payment/sales tax from collected">Payment/sales tax from collected</option>
                    				 <option value="Data Sheets">Data Sheets</option>
                    				 <option value="Re-reeling">Re-reeling</option>
                    				 <option value="Resolving Technical Query">Resolving Technical Query</option>
                    				 <option value="Submitted Quote Status">Submitted Quote Status</option>
                    				 <option value="Tender Quotation Submission">Tender Quotation Submission</option>
                    				 <option value="TPC/Negotiation Meeting">TPC/Negotiation Meeting</option>
                     		 	</select>
               				 	</p>
              				<p>
              						<input class="button-right" type="button" id="vsobjok" value="ok"/>
              				</p>
              			
              				
                    		   
                    </div>
              	</td>
                    <td width="75" bgcolor="#cccccc">
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
               				 <tr>
               				 	<td width="98%" align="center" valign="top">
               				 		<input type="text" name="vistOC1" id="visitOCpop1" size="8" value="" class="tdinput"/>
               				 	</td>
              					
              				</tr>
              			</table>
							
					</td>
                    <td align="center" bgcolor="#cccccc">
                    <img src="<%=application.getContextPath() %>/images/arrow-li-2.gif" width="26" height="22" border="0" align="absmiddle" id="pop1" class="popup"/>
                      <div id="bulletinDialog" style="display: none;" title="Action To Be Taken">
                    <textarea id="editor"  name="Message" rows="10" ></textarea>
                      
                    <input class="button-right" type="button" id="ok" value="ok" id="pop"/>                     </div>
                     <input type="hidden" name="nst1" id="nstpop1"/></td>
                    <td  bgcolor="#cccccc"><input name="kms1" id="kms1" type="text" size="3"  class="tdinput"/></td>
                    <%-- <td align="center" bgcolor="#cccccc">
    <a href="javascript:void()" onclick="javascript:window.open('<%=application.getContextPath() %>/opportunity/open.do?org='+document.myform.org1.value+'&div='+document.myform.disig1.value+'&contPers='+document.myform.contper1.value)">
<img src="<%=application.getContextPath() %>/images/enquiry-2.jpg" align="middle" id="enq1" border="0"/> </a></td>   --%> 
              </tr>                </table>                  </td>
              </tr>
              <tr>
                <td height="10" align="left" valign="top"></td>
              </tr>
              <tr>
                <td align="left" valign="top"><input type="button" name="Submit4" value="Add" onclick="addRow('infoTable')" class="button-black" />
                    <input type="button" name="Submit4" value="Delete" onclick="deleteRow('infoTable')" class="button-black" /> 
            		<a href="<%=application.getContextPath() %>/accounts/open.do" target="_blank"><input type="button" name="addaccount" value="Add Company" class="button-black"/></a>        
               </td>
              </tr>
             <!--  <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr> -->
              <tr>
                <td><table width="895" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="528" align="left" valign="top">
                    <span style="color: red; font-size: 12px">*Must Enter Company Details, Division and Contact Person If they are not Available.</span> </td>
                    <td width="367" align="left" valign="top">
                   			
                    </td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="5"></td>
              </tr>
              <tr>
                <td><input type="submit" name="Submit" value="Submit" class="button-black-right" onclick="javascript: return checkDailyReport()" />
               
                <input type="hidden" name="rCount" id="rCount" value="1"/>
                </td>
                
              </tr>
            </table>                       </td>
  </tr>
         
          <tr>
            <td align="left" valign="top">&nbsp;</td>
          </tr>
          <tr>
            <td height="10">
            	<div id="ajaxLoader" style="display:none" align="center"><img src="<%=application.getContextPath()%>/images/load.gif"/></div> 
            </td>
          </tr>
          <tr>
            <td align="right" valign="top">&nbsp;</td>
          </tr>
          
          <tr>
            <td align="left" valign="top">&nbsp;</td>
          </tr>
          <tr>
            <td align="left" valign="top">&nbsp;</td>
          </tr>
        </table></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      
    </table></td>
  </tr>
  <tr>
    <td height="40" align="left" valign="top" bgcolor="#0B0B0B">&nbsp;</td>
  </tr>
</table></form>
</body>
</html>

<script type="text/javascript">
	$("#vsobjok").click(function(){
	var b= $("#vistObj").val();
	//alert(b);
	var cls=$('#vistObj').attr('class');
	//alert(cls);

	var text=$('#visit'+cls).val(b);
	$('#visit'+cls).attr("title",b);
	$('#visitobjDialog').dialog('close');

	//alert(text.val());
	});
		
</script>
<script type="text/javascript">
	$("#vsoutok").click(function(){
	var b= $("#vistoutcome").val();
	//alert(b);
	var cls=$('#vistoutcome').attr('class');
	//alert(cls);

	var text=$('#visit'+cls).val(b);
	$('#visitOcDialog').dialog('close');

	//alert(text.val());
	});
		
</script>
<script type="text/javascript">
$("#ok").click(function(){

var b= $("#editor").val();
//alert(b);
var cls=$('#editor').attr('class');
//alert(cls);

var text=$('#nst'+cls).val(b);
$('#bulletinDialog').dialog('close');

//alert(text.val());
});

</script>
<script type="text/javascript">
$("#save").click(function(){

var b= $("#mobile").val();
alert(b);
var cls=$('#mobile').attr('class');
//alert(cls);

var text=$('#mbl'+cls).val(b);

$('#contdetDailog').dialog('close');

//alert(text.val());
});

</script>

<style>
		body { font-size: 62.5%; }
		label, input { display:block; }
		input.text { margin-bottom:12px; width:95%; padding: .4em; }
		fieldset { padding:0; border:0; margin-top:25px; }
		h1 { font-size: 1.2em; margin: .6em 0; }
		div#users-contain { width: 350px; margin: 20px 0; }
		div#users-contain table { margin: 1em 0; border-collapse: collapse; width: 100%; }
		div#users-contain table td, div#users-contain table th { border: 1px solid #eee; padding: .6em 10px; text-align: left; }
		.ui-dialog .ui-state-error { padding: .3em; }
		.validateTips { border: 1px solid transparent; padding: 0.3em; }
	</style>

<script type="text/javascript">
function checkDailyReport(){
	var count= $("#rCount").val();
	var c=parseInt(count);
	//alert(count);
	for(var i=1;i<=c;i++){
		var org=$("#org-"+i).val();
		var div=$("#disig-"+i).val();
		var contper=$("#contper-"+i).val();
		for(var j=1;j<=c;j++){
			var orgj=$("#org-"+j).val();
			var divj=$("#disig-"+j).val();
			var contperj=$("#contper-"+j).val();
			if(j!=i){
				if(org==orgj && div==divj && contper==contperj){
					jAlert("Duplicate Entry is there");					
					return false;
				}
				
			}
			break;break;
		}
		
	}
	
}
</script>
